/dump C_PetJournal.GetPetInfoByIndex(1)
local l = {"生气勃勃的天驹"}
local G = C_PetJournal.GetPetInfoByIndex
for i=1,#l do
  for j = 1,5000 do
    local id, n = select(1, G(j)), select(8, G(j))
    if n and id and n==l[i] then
      C_PetJournal.CagePetByID(id)
    end
  end
end
G,l=C_PetJournal.GetPetInfoByIndex,{"生气勃勃的天驹"}for i=1,#l do for j=1,5000 do id,n=select(1,G(j)),select(8,G(j)) if n and id and n==l[i] then C_PetJournal.CagePetByID(id) end end end